package com.yashi.springmvcjbpm.ruleTest;


import org.jbpm.api.jpdl.DecisionHandler;
import org.jbpm.api.model.OpenExecution;

import com.yashi.springmvcjbpm.service.impl.RuleServiceimpl;


public class RuleTest implements DecisionHandler{

	@Override
	public String decide(OpenExecution arg0) {
		String go = null;
		System.out.println("map=="+arg0.getVariables());
		String leaveLong= (String) arg0.getVariable("leaveLong");
		leaveLong = RuleServiceimpl.changeVale(leaveLong);
		if(Integer.valueOf(leaveLong)>3){
			go="老板审批";	
		}else{
	      	go="结束";
		}
		return go;
	}

}
